import request from "@/utils/request";

const DEPT_BASE_URL = "/device/script";

export function listApi(data) {
  return request({
    url: `${DEPT_BASE_URL}/list`,
    method: "post",
    data: data,
  });
}

export function delApi(data) {
  return request({
    url: `${DEPT_BASE_URL}/del`,
    method: "post",
    data: data,
  });
}

export function addApi(data) {
  return request({
    url: `${DEPT_BASE_URL}/add`,
    method: "post",
    data: data,
  });
}

export function downloadApi(data, fileName) {
  return request({
    url: `${DEPT_BASE_URL}/download${fileName}`,
    method: "post",
    data: data,
  });
}

export function getScriptInfo(data) {
  return request({
    url: `${DEPT_BASE_URL}/info`,
    method: "post",
    data: data,
  });
}

